<template>
  <div style="margin-right: 20px; height: 500px; width: 250px; float: left">
    <div class="hc_lnav jslist">
      <div class="allbtn">
        <ul class="box" style="padding: 0">
          <li style="text-align: center;padding: 10px;">分类栏</li>
          <li class="a1" v-for="item in typeList" :key="item.id">
            <dl style="display: flex; justify-content: space-between">
              <dt><a href="">{{ item.classificationName }}</a></dt>
              <dt><i class="el-icon-d-arrow-right"></i></dt>
            </dl>
            <div class="pop">
              <dl v-for="itemChildren in item.children" :key="itemChildren.id">
                <dt><a href="">{{ itemChildren.classificationName }}</a></dt>
                <br />
                <dd v-for="child in itemChildren.children" :key="child.id">
                  <a class="ui-link" href="#">{{ child.classificationName }}</a>
                </dd>
              </dl>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import { getType } from "../api/classpage";

export default {
  data() {
    return {
      oneType: [],
      typeList: [],
    };
  },
  methods: {},
  mounted() {
    getType().then(({ data }) => {
      this.typeList = data.data;
      console.log(data.data);
    });
  },
};
</script>

<style scoped>
a {
  text-decoration: none;
  font-weight: 300 !important;
  color: rgb(0, 0, 0);
}


li {
  list-style-type: none;
}

.hc_lnav {
  z-index: 10;
  position: relative;
  /* width: 190px; */
  /* margin: 40px 0 0 120px; */
}

.hc_lnav .allbtn {
  /* z-index: 9999;
  position: relative; */
  width: 250px;
  height: 486px;
  /* border: 3px dashed rgb(171, 171, 206); */
  background-color: white;
}

.hc_lnav .allbtn h2 {
  font-size: 14px;
  /* box-shadow: 2px 0px 6px -3px #800000;
  -webkit-box-shadow: 2px 0px 6px -3px #800000;
  -moz-box-shadow: 2px 0px 6px -3px #800000; */
}


.hc_lnav .allbtn ul {
  z-index: 99999;
  /* position: absolute; */
  /* background-color: white; */
  width: 250px;
  display: block; /*可以设置菜单是显示还是隐藏   display：none；为隐藏*/
  height: 486px;
  top: 36px;
  left: 0px;
  border: 3px dashed #2e4500;
}

body.hc_home .hc_lnav .allbtn ul {
  display: block;
}

body.hc_list .hc_lnav .allbtn ul {
  display: block;
}

.hc_lnav .allbtn ul li {
  /* padding-bottom: 7px; */
  zoom: 1;
  clear: both;
  cursor: default;
}

.hc_lnav .allbtn ul li .tx {
  line-height: 35px;
  background-color: black;
  /* padding-left: 10px; */
  background-repeat: no-repeat;
  background-position: right center;
  height: 35px;
  _background-image: none;
}

.hc_lnav .allbtn ul li dl {
  zoom: 1;
  color: black;
  clear: both;
  overflow: auto;
  /* padding-top: 4px; */
}

.hc_lnav .allbtn ul li dl a {
  line-height: 22px;
  white-space: nowrap;
  float: left;
  /* color:; */
  margin-left: 6px;
  margin-right: 6px;
}

.hc_lnav .allbtn ul li dt {
  padding-left: 10px;
  padding-right: 10px;
  /* width: 180px; */
  float: left;
  padding-top: 1px;
}

.hc_lnav .allbtn ul li dd {
  line-height: 22px;
  width: 150px;
  padding-top: 2px;
}

.hc_lnav .allbtn ul li .pop {
  /* border: black 2px solid; */
  position: absolute;
  border-left: medium none;
  background-color: white;
  padding-left: 30px;
  width: 640px;
  padding-right: 30px;
  display: none;
  height: 500px;
  border-top: medium none;
  top: 0px;
  /* border-right: #eedddd 2px solid; */
  /* padding-top: 10px; */
  left: 300px;
  border: 3px dashed #a1c323;
  box-shadow: 4px 4px 5px -1px #999999; 
   -webkit-box-shadow: 4px 4px 5px -1px #999999; 
  -moz-box-shadow: 4px 4px 5px -1px #999999;
}

.hc_lnav .allbtn ul li .pop h3 {
  display: none;
  font-size: 14px;
}


.hc_lnav .allbtn ul li .pop dl:hover {
  background-color: #f3f3f3;
}

.hc_lnav .allbtn ul li .pop dl a {
  color: #666666;
  margin-left: 12px;
  }

/* .hc_lnav .allbtn ul li .pop dl a.un {
  color: #a5a5a5;
} */

.hc_lnav .allbtn ul li .pop dd {
  width: 565px;
}

.hc_lnav .allbtn ul li .pop .act {
  width: 640px;
  height: 80px;
  overflow: hidden;
}

.hc_lnav .allbtn:hover ul {
  display: block;
}

.hc_lnav .allbtn ul li:hover {
  /* border-top: 1px dashed rgb(171, 171, 206) ; */
  /* border-bottom: 1px dashed rgb(171, 171, 206) ; */
  background-color: #aec323;
}



.hc_lnav .allbtn ul li:hover .tx a {
  color: #333333;
}

.hc_lnav .allbtn ul li:hover .tx a i {
  background-position: 0px -25px;
}

.hc_lnav .allbtn ul li:hover .pop {
  display: block;
  top: 0px;
  left: 250px;
}

</style>